package com.udata.client.stoke;

import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Element;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.Cookies;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.UIObject;
import com.udata.client.service.UserService;
import com.udata.client.service.UserServiceAsync;
import com.udata.shared.model.UserB;

public class StokeWidget extends Composite {

	private UserServiceAsync userService = GWT.create(UserService.class);

	interface MyUiBinder extends UiBinder<HTMLPanel, StokeWidget> {
	}

	public StokeWidget() {
		initWidget(uiBinder.createAndBindUi(this).asWidget());
		String userInfo = Cookies.getCookie("PSFE_user");
		if (userInfo != null) {
			GWT.log(userInfo);
			userName.setText("User:" + userInfo.split(";")[1]);
		}
	}

	private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);

	@UiField
	Label userName;

}
